//
//  JobTableViewCell.m
//  XRSquare
//
//  Created by UaenaMo on 2018/8/15.
//  Copyright © 2018年 UaenaMo. All rights reserved.
//

#import "JobTableViewCell.h"

@interface JobTableViewCell ()
{
    UIImageView * imageView;
    UILabel * titleLabel;
}
@end

@implementation JobTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        imageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 40, 40)];
        imageView.contentMode = UIViewContentModeScaleAspectFill;
        imageView.clipsToBounds = YES;
        imageView.layer.cornerRadius = 20;
        [self addSubview:imageView];
        
        titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(60, 10, ScreenWidth, 40)];
        titleLabel.font = [UIFont boldSystemFontOfSize:15];
        [self addSubview:titleLabel];
    }
    return self;
}

+(CGFloat)height
{
    return 60;
}

-(void)loadData:(NSDictionary *)data
{
    [imageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://pic.xrsquare.com/%@",[data objectForKey:@"UserHeadPic"]]]];
    titleLabel.text = [data objectForKey:@"NickName"];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
